package core;

import android.util.Log;

/**
 * 参数提供者 简单实现
 */
public class SimpleParamProvider implements ParamProvider {

    protected final OptionalParam params;

    public SimpleParamProvider() {
        params = new OptionalParam();
    }

    @Override
    public OptionalParam getParams() {
        return params;
    }

    protected final void append(String key, String value) {
        if (value != null) {
            params.put(key, value);
        } else {
            Log.e(key, "is null");
        }
    }

    public final String inflate() {
        return ResponseUtil.inflateQueries(params.getMap());
    }
}
